package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.EsLendForm;
import com.ruoyi.system.domain.EsLendFormProduct;

/**
 * 商品借出单(es_lend_form)Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-06
 */
public interface EsLendFormMapper
{
    /**
     * 查询商品借出单(es_lend_form)
     *
     * @param id 商品借出单(es_lend_form)主键
     * @return 商品借出单(es_lend_form)
     */
    public EsLendForm selectEsLendFormById(Long id);

    /**
     * 查询商品借出单(es_lend_form)列表
     *
     * @param esLendForm 商品借出单(es_lend_form)
     * @return 商品借出单(es_lend_form)集合
     */
    public List<EsLendForm> selectEsLendFormList(EsLendForm esLendForm);

    /**
     * 新增商品借出单(es_lend_form)
     *
     * @param esLendForm 商品借出单(es_lend_form)
     * @return 结果
     */
    public int insertEsLendForm(EsLendForm esLendForm);

    /**
     * 修改商品借出单(es_lend_form)
     *
     * @param esLendForm 商品借出单(es_lend_form)
     * @return 结果
     */
    public int updateEsLendForm(EsLendForm esLendForm);

    /**
     * 删除商品借出单(es_lend_form)
     *
     * @param id 商品借出单(es_lend_form)主键
     * @return 结果
     */
    public int deleteEsLendFormById(Long id);

    /**
     * 批量删除商品借出单(es_lend_form)
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEsLendFormByIds(Long[] ids);

    /**
     * 确认商品借出单
     */
    int confirmEsLendForm(Long id);

    /**
     * 归还商品借出单
     */
    int returnEsLendForm(Long id);

    public List<EsLendFormProduct> selectAvailableProducts(EsLendFormProduct product);

    /**
     * 根据借出单ID删除商品明细
     */
    int deleteEsLendFormProductByLendId(Long lendId);

    /**
     * 新增借出单商品明细
     */
    int insertEsLendFormProduct(EsLendFormProduct product);
}
